import { createRouter, createWebHistory } from 'vue-router'
import login from "../views/login.vue";
import usermanage from "../views/usermanage.vue";
import building from "../views/building.vue";
import shop from "../views/shop.vue";
import article from "../views/article.vue";
import center from "../views/center.vue";

const routes = [
  {
    path: '/redirect',
    redirect: '/'
  },
  {
    path: '/',
    name: 'login',
    component:login
  },
  {
    path: '/user',
    name: 'usermanage',
    component:usermanage,
    meta:{id:'1'}
  },
  {
    path: '/building',
    name: 'building',
    component:building,
    meta:{id:'2'}
  },
  {
    path: '/shop',
    name: 'shop',
    component:shop,
    meta:{id:'3'}
  },
  {
    path: '/article',
    name: 'article',
    component:article,
    meta:{id:'4'}
  },
  {
    path: '/center',
    name: 'center',
    component:center,
    meta:{id:'5'}
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
